package com.shuma.product.ExceptionEnum;

/**
 * @author yaoyuan
 * @date 2024年06月17日 上午10:27
 */
public enum ExceptionEnum {
    SUCCESS(1,"成功"),
    PARAM_IS_INVALID(1001,"参数无效"),
    PARAM_IS_BLANK(1002,"参数为空"),
    PARAM_TYPE_BIND_ERROR(1003,"参数类型错误"),
    PARAM_NOT_COMPLETE(1004,"参数缺少"),
    USER_NOT_LOGGED_IN(2001,"用户未登录"),
    USER_LOGGIN_ERROR(2002,"账号不存在或密码错误"),
    USER_NOT_EXIST(2003,"用户不存在"),
    USER_HAS_EXISTED(2004,"用户已存在"),
    SYSTEM_ERROR(3001,"服务器异常");

    private int code;
    private String message;

    ExceptionEnum(int code,String message) {
        this.code = code;
        this.message = message;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
